/*
 * uart_slave.h
 *
 *  Created on: May 23, 2025
 *      Author: lsy18
 */

#ifndef COMMUNICATE_UART_SLAVE_UART_SLAVE_H_
#define COMMUNICATE_UART_SLAVE_UART_SLAVE_H_

#include "tim.h"
#include "usart.h"

#define htim_slave_send htim2

#define huart_slave_it huart2

//帧头标志
#define TRAN_HEAD 0xAA
#define RECEIVE_HEAD 0xAA

#define SLAVE_ADRESS 0x02

void uart_slave_init();
void slave_exam();
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim);

#endif /* COMMUNICATE_UART_SLAVE_UART_SLAVE_H_ */
